<?php $this->_compileInclude('head'); ?>
<body>
<!--导航-->
<?php $this->_compileInclude('nav'); ?>
<!--主体-->
<div id="main">
	<!--主体右侧 -->
	<div id="right_760" class="right_970">
    	<?php $this->_compileInclude('bread'); ?>
    	<div class="bor_top"></div>
    	<div class="bor_mid">
            	<h2 class="page_title" style="line-height:0.5em;"><img src="app/exam/styles/image/shitiliebiao_tit.jpg" alt="试题列表" class="mr_10" /><span id="time_top">考试剩余时间：<b><span id="timer_h">00</span>：<span id="timer_m">00</span>：<span id="timer_s">00</span></b></span></h2>
                <div id="exam_page">
                	<p class="ta_r mb_10"><span class="mr_10"><i class="exam_icon_yes"></i>已答试题</span><span class="mr_10"><i class="exam_icon_no"></i>未答试题</span></p>
                	<?php $oid = 0; ?>
                	<?php $qid = 0;
 foreach($this->tpl_var['questype'] as $key => $quest){ 
 $qid++; ?>
                	<?php if($this->tpl_var['sessionvars']['examsessionquestion']['questions'][$quest['questid']] || $this->tpl_var['sessionvars']['examsessionquestion']['questionrows'][$quest['questid']]){ ?>
	                <?php $oid++; ?>
	                <dl class="clear">
                    	<dt class="float_l"><b><?php echo $quest['questype']; ?></b></dt>
                        <dd id="signcontent">
                        	<?php $tid = 0; ?>
			                <?php $qnid = 0;
 foreach($this->tpl_var['sessionvars']['examsessionquestion']['questions'][$quest['questid']] as $key => $question){ 
 $qnid++; ?>
			                <?php $tid++; ?>
                        	<a href="?exam-app-exampaper-paper#qtion_<?php echo $question['questionid']; ?>" rel="_<?php echo $quest['questid']; ?>-<?php echo $tid; ?>" class="the <?php if($this->tpl_var['sessionvars']['examsessionuseranswer'][$question['questionid']]){ ?>yes <?php } ?><?php if($this->tpl_var['sessionvars']['examsessionsign'][$question['questionid']]){ ?>mark<?php } ?>"><?php echo $tid; ?></a>
                        	<?php } ?>
                        	<?php $qrid = 0;
 foreach($this->tpl_var['sessionvars']['examsessionquestion']['questionrows'][$quest['questid']] as $key => $questionrow){ 
 $qrid++; ?>
			                <?php $tid++; ?>
							<?php $alreadydo = ''; ?>
							<?php $alreadymark = ''; ?>
			                <?php $did = 0;
 foreach($questionrow['data'] as $key => $data){ 
 $did++; ?>
							<?php if($this->tpl_var['sessionvars']['examsessionuseranswer'][$data['questionid']]){ ?><?php $alreadydo = 'yes'; ?><?php } ?>
							<?php if($this->tpl_var['sessionvars']['examsessionsign'][$data['questionid']]){ ?><?php $alreadymark = 'mark'; ?><?php } ?>
							<a href="?exam-app-exampaper-paper#qtion_<?php echo $data['questionid']; ?>" rel="_<?php echo $quest['questid']; ?>-<?php echo $tid; ?>" class="the <?php if($this->tpl_var['sessionvars']['examsessionuseranswer'][$data['questionid']]){ ?>yes <?php } ?><?php if($this->tpl_var['sessionvars']['examsessionsign'][$data['questionid']]){ ?>mark<?php } ?>"><?php echo $tid; ?>-<?php echo $did; ?></a>
			                <?php } ?>
			                <?php } ?>
                        </dd>
                    </dl>
                    <?php } ?>
                    <?php } ?>
              </div>
              <div id="bnt_back_next"><a href="javascript:history.back(-1);" id="btn_back_l"></a></div>
    	</div>
    	<div class="bor_bottom"></div>
    	<form id="form2" name="form2" action="?exam-app-exampaper-score" style="display:none;" method="post">
    	</form>
    </div>
	<!--主体右侧 结束-->
	<!--尾部-->
	<?php $this->_compileInclude('foot'); ?>
    <!--尾部 结束-->
</div>
<script type="text/javascript">
$(document).ready(function(){
$.get('?exam-app-index-ajax-lefttime&rand'+Math.random(),function(data){
		var setting = {
			time:<?php echo $this->tpl_var['sessionvars']['examsessiontime']; ?>,
			hbox:$("#timer_h"),
			mbox:$("#timer_m"),
			sbox:$("#timer_s"),
			finish:function(){$('#form2').submit();}
		}
		setting.lefttime = parseInt(data);
		countdown(setting);
	});
});
var subpaper = function()
{
	art.dialog({lock:true,resize:false,width:320,height:150,title:'交卷提醒',ok:function(){$('#form2').submit();},okval:'交卷',cancel:true,cancelval:'取消',content:'您确认要交卷吗？'});
}
</script>
</body>
</html>